<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>e Statement</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="ScoregensTop.html" title="Score Statements and GEN Routines" />
    <link rel="prev" href="b.html" title="b Statement" />
    <link rel="next" href="f.html" title="f Statement (or Function Table Statement)" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">e Statement</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="b.html">Prev</a> </td>
          <th width="60%" align="center">Score Statements and GEN Routines</th>
          <td width="20%" align="right"> <a accesskey="n" href="f.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="e"></a>
      <div class="titlepage"></div>
      <a id="IndexEStatement" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">e Statement</span>
        </h2>
        <p>e statement — 
      This statement may be used to mark the end of the last section of the score.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp212280112"></a>
        <h2>Description</h2>
        <p>
      This statement may be used to mark the end of the last section of the score.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp212281408"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>e</strong></span> [time]</pre>
      </div>
      <div class="refsect1">
        <a id="idp212340160"></a>
        <h2>Performance</h2>
        <p>
      The first p-field <span class="emphasis"><em>time</em></span> is optional and if present determines the end time (length in beats) of the final section of the score.  This time must be after the end of the last event otherwise it will have no effect. "Always on" instruments will end at the given time. Extending the section in this way is useful to avoid prematurely cutting off reverb tails or other effects.
    </p>
        <div class="refsect2">
          <a id="idp212341968"></a>
          <h3>Special Considerations</h3>
          <p>
        The <span class="emphasis"><em>e statement</em></span> is contextually identical to an <a class="link" href="s.html" title="s Statement"><em class="citetitle">s statement</em></a>. Additionally, the <span class="emphasis"><em>e statement</em></span> terminates all signal generation (including indefinite performance) and closes all input and output files.
      </p>
          <p>
        If an <span class="emphasis"><em>e statement</em></span> occurs before the end of a score, all subsequent score lines will be ignored.
      </p>
          <p>
        The <span class="emphasis"><em>e statement</em></span> is optional in a score file yet to be sorted. If a score file has no <span class="emphasis"><em>e statement</em></span>, then Sort processing will supply one.
      </p>
        </div>
      </div>
      <div class="refsect1">
        <a id="idp212347488"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the e statement. It uses the file <a class="ulink" href="examples/e.csd" target="_top"><em class="citetitle">e.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp212349344"></a>
          <p class="title">
            <strong>Example 1078. Example of the e statement.</strong>
          </p>
          <div class="example-contents">
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac     <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if RT audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o e.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
<span class="ohdr">0dbfs</span>  <span class="op">=</span> 1

ga1 <span class="opc">init</span> 0

<span class="oblock">instr</span> 1

aenv <span class="opc">expseg</span> .01, p3<span class="op">*</span>0.1, 1, p3<span class="op">*</span>0.9, 0.01
ga1  <span class="opc">poscil3</span> .5<span class="op">*</span>aenv, <span class="opc">cpspch</span>(p4), 1
     <span class="opc">outs</span> ga1,ga1
<span class="oblock">endin</span>

<span class="oblock">instr</span> 99
 
aL, aR  <span class="opc">reverbsc</span> ga1, ga1, 0.85, 12000, sr, 0.5, 1
<span class="opc">outs</span> aL,aR

ga1 <span class="op">=</span> 0

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="stamnt">f</span> 1 0 128 10 1		<span class="comment">;sine wave</span>

<span class="stamnt">i</span> 1 1 0.1 8.00
<span class="stamnt">i</span> 1 2 0.1 8.02
<span class="stamnt">i</span> 1 3 0.1 8.04
<span class="stamnt">i</span> 1 4 0.1 9.06

<span class="stamnt">i</span> 99 0 6		<span class="comment">;remains active for 6 seconds</span>

<span class="stamnt">e</span>10
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="b.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="ScoregensTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="f.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">b Statement </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> f Statement (or Function Table Statement)</td>
        </tr>
      </table>
    </div>
  </body>
</html>
